#pragma once

#include <linux/types.h>
#include <linux/timerqueue_types.h>

struct hrtimer_clock_base;

/*
 * Return values for the callback function
 */
enum hrtimer_restart
{
    HRTIMER_NORESTART, /* Timer is not restarted */
    HRTIMER_RESTART,   /* Timer must be restarted */
};

struct hrtimer
{
    struct timerqueue_node node;
    struct hrtimer_clock_base *base;
    ktime_t _softexpires;
    enum hrtimer_restart (*function)(struct hrtimer *);
    u8 state;
    u8 is_rel;
    u8 is_soft;
    u8 is_hard;
};

/**
 * struct hrtimer_sleeper - simple sleeper structure
 * @timer:	embedded timer structure
 * @task:	task to wake up
 *
 * task is set to NULL, when the timer expires.
 */
struct hrtimer_sleeper
{
    struct hrtimer timer;
    struct task_struct *task;
};
